What is a Smile sheet ? - Text windows with buttons
A Smile sheet is simply a text window with button(s) installed onto to it.
That is :
Smile sheet = Smile text window + button(s)
Those familiar with text windows and buttons can make there own Smile sheet(s). It is fairly easy to build fairly useful sheets, as is shown in the help for very beginners. Or you can use the Smile sheets shipped with Smile. Some help on these sheets is given below.
Related help information
• If you are not familiar with basic operation of text windows, refer to the text window help file.
• If you are not familiar with the function of buttons and the installation of buttons onto text windows, refer to help file button.
• To display the help information that is included with each button, Control-click on the button to open its pulldown menu, then select "Help...".
Opening Smile sheets
Smile sheets are text windows and can be opened the same way as any text window. For example, they can be opened by double-clicking the Smile sheet icon, (or an alias) or by using "Open..." ("File" menu). Since Smile sheets may be used over and over, you may want to have ready access to opening one or more of you favorites. In this case you may want to include these Smile sheets in the "Favorites" menu of the Open File dialog box.
Saving Smile sheets
Smile sheets are text windows and are saved the same as any text window. As noted above, Smile ships with Smile sheets in the "Smile sheets" folder, and as an option, you may choose to keep any Smile sheets of your own making in the same folder. Just as "favorites" menu can be used to open Smile sheets, a "favorites" menu can be used to select a favorite destination for your Smile sheets.
See "File" menu for additional information on the "Save as..." command and its use in setting up bookmarks for you favorite destinations.
Smile sheets shipped with Smile
In the "Advanced stuff" folder have been included (possibly, in a sub-folder) two sample sheets. Below is given a short description of what you can use these two sheets for. Additional help is available, when the sheets are open, by selecting "Help…" in the contextual menu of each button.
• Open any file
This sheet can be used to display the data fork of files, either as characters, or as hexa. You can either use the buttons, which will open an "Open file" dialog box, or drag-and-drop a file onto the window. In this case, the data fork is displayed as characters.
• Compare folders
This sheet is given as a simple interface to the "backup" command of the Satimage osax. If you want to list the differences between two folders, drop the folders onto the sheet, then click the "Compare" button. The "Update -->" button will "backup" one folder onto the other.
• Usually, a sheet is intended to some particular task, so it is often natural to define some common handlers and properties in the object script of the window, which will be called by the buttons.
• If the sheet has an object script, you can store data in the properties of this script. When you save the window, the data will be saved with the script, and will be available next time the "sheet" is opened.
• You can also store data directly into the properties of the window. This can be useful, for instance, to make data more persistent : the data stored in the properties of the script will be lost if the script is modified.
The text window has a special property, "extras", which is a placeholder devoted to store any user (AppleScript) data.
• A sheet can be customized still further. You may want to customize also the standard (as text window) behavior of the window. This can be done by installing standard AppleEvents handlers in the object script of the sheet.
For instance, the handler :
----------------------------
on close theWindow saving whatever
continue close theWindow saving yes
end close
----------------------------
can be installed in the script of the sheet to force saving of the changes when the window is closed.
• As mentioned in the button help, you can install a handler "helpString" in the script of a button to provide help when the user selects "Help" in the contextual menu of the button.
You can also provide help when the user presses the "Help" key. For this, you must install the help handler in the object script of the sheet. The syntax must be as follows :
----------------------------
on DoHelp (theWindow)
-- provide help to the user
end DoHelp
----------------------------
This handler will be called each time the user presses the "Help" key with the sheet as the active window.
Note that the default DoHelp handler will be called if your handler makes an error. In certain cases, you may want to issue an error on purpose, in order to invoke the default behavior instead of hiding it.
Using "Smile help" ("Help" menu) will in any case open the general "Help" window.